<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {margin: 0;overflow: hidden;}
    #canvas {background-color: antiquewhite;}
  </style>
</head>
<body>
  <canvas id="canvas"></canvas>
  <script>
    /** @type {HTMLCanvasElement} */
    const canvas = document.querySelector('#canvas');
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
    const ctx = canvas.getContext('2d');

    // 移动变换
    ctx.translate(300,300);

    // 水滴
    ctx.beginPath()
    ctx.moveTo(0,0);

    // 二次贝塞尔曲线
    ctx.quadraticCurveTo(50,-50,50,-100);
    // 绘制圆弧
    ctx.arc(0,-100,50,0,Math.PI,true);
    // 二次贝塞尔曲线
    ctx.quadraticCurveTo(-50,-50,0,0);

    ctx.fill();

  </script>
</body>
</html>